package qq2564874169.tuaotuao.fx.json.jackson;

import  qq2564874169.tuaotuao.fx.Dynamic;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.databind.SerializerProvider;

import java.io.IOException;

public class DynamicSerializer extends JsonSerializer<Dynamic> {
    @Override
    public void serialize(Dynamic dynamic, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
        jsonGenerator.writeObject(dynamic.toMap());
    }
}
